package org.ands.client.aodn;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.ands.apps.PropertyHelper;
import org.ands.data.Contents;
import org.ands.data.ContentsRetrieverDataSetContainingContacts;
import org.ands.data.IClientContentsRetriever;
import org.ands.input.IInputHelperFactory;
import org.ands.input.InputHelperFactoryFilename;
import org.ands.xml.NamespaceContextMCP;

public class ContentsRetrieverTestFileAODN  implements IClientContentsRetriever {
	
	@Override
	public Map<Integer, List<Contents>> getXmlContentsFromClient(
			PropertyHelper propHelper) throws Exception {
		
		PropertyHelperAODN AODNPropertyHelper = new PropertyHelperAODN();
		Map<FileSubject, String> crosswalkFilenames = AODNPropertyHelper.getCrosswalkFilenames(propHelper);
		
		List<String> fileList = new ArrayList<String>();
		fileList.add("file:/home/anucsiro/projects/AODN/AODN_BOM_EPSG_GeodeticParameterDataset_70bd69ca-31e1-4ede-9c46-b5bab764cd79.xml");
		
		assert(false); //Fix me.. I need to be like the ContentsRetrieverTestFileURI and process one MD_Metadata node and children at a time
		throw new Exception("Fix me");
		
//		ContentsRetrieverDataSetContainingContacts contentsRetrieverDataSetContainingContacts = new ContentsRetrieverDataSetContainingContacts();
//		
//		IInputHelperFactory inputHelperFactory = new InputHelperFactoryFilename(fileList, new NamespaceContextMCP());
//		return contentsRetrieverDataSetContainingContacts.getXmlContentsFromSource(
//				crosswalkFilenames,
//				inputHelperFactory);
	}
	
	@Override
	public String getOutFileFromConfig(PropertyHelper propertyHelper)
			throws Exception {
		
		return propertyHelper.getProperty("RIF_CS_XML_OUT_AODN", true);
		
	}

}
